home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 25 / AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso / Tools / SFX-Player / Mpeg / MrMPEG / ListLoad.rexx < prev    next >
OS/2 REXX Batch file  |  2000-05-08  |  1KB  |  39 lines

  1. /* ListLoad.rexx */
  2.  
  3. options results; parse arg mode; address MrMPEG
  4.  
  5. ASLFR_InitialDrawer    = 0x80080009;    ASLFR_InitialFile    = 0x80080008
  6. MUIA_List_Active    = 0x8042391c;    MUIA_List_Entries    = 0x80421654
  7. MUIA_ShowMe        = 0x80429ba8;    MUIV_List_Active_Bottom    = -3
  8. MUIV_List_Active_Top    = -2
  9.  
  10. if mode ~= 0 then
  11.   aslrequest TITLE '"Load list"' ATTRS ASLFR_InitialDrawer "ENVARC:",
  12.     ASLFR_InitialFile "MrMPEG.list"
  13. else result = "ENV:MrMPEG.list"
  14. if open('List', result, 'r') = 1 then do
  15.   if mode = 1 then call Clear.rexx
  16.   list ID SLIST ATTRS MUIA_List_Entries; entries = result
  17.   do forever
  18.     temp = readln('List')
  19.     if eof('List') then leave
  20.     list ID SLIST INSERT NODUP POS MUIV_List_Active_Bottom STRING temp
  21.   end
  22.   call close('List')
  23.   list ID SLIST ATTRS MUIA_List_Entries; temp_max = result
  24.   setvar max temp_max
  25.   text ID MAX LABEL "\033b\033r"right(temp_max, 3)
  26.   temp_total_time = 0
  27.   do i = 0 to temp_max - 1
  28.     list ID SLIST POS i
  29.     parse var result dummy','temp_song_time','dummy2
  30.     temp_total_time = temp_total_time + left(temp_song_time, 2) * 60 + right(temp_song_time, 2)
  31.   end
  32.   temp_string = right(temp_total_time % 3600, 2, 0)||":"||,
  33.     right(temp_total_time // 3600 % 60, 2, 0)":"right(temp_total_time // 60, 2, 0)
  34.   setvar total_time temp_string
  35.   text ID TOTAL LABEL "\033b\033r"temp_string
  36.   if entries = 0 then list ID SLIST ATTRS MUIA_List_Active MUIV_List_Active_Top
  37. end
  38. return
  39.